/* 
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
package com.googlecode.hmvc4gwt.example.hmvcblog.frontend.blog.client.blog.links;

import com.google.gwt.user.client.ui.Hyperlink;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.googlecode.hmvc4gwt.example.hmvcblog.frontend.blog.client.blog.links.events.in.ShowLinkViewEvent;
import com.googlecode.hmvc4java.event.IEvent;
import com.googlecode.hmvc4java.registry.controller.AControllerModelViewRegistry;

/**
 * 
 *
 * @author jens.meiss
 */
public class LinkController extends AControllerModelViewRegistry<LinkModel, LinkView> {

	public void handleEvent(IEvent event) {
		if (event.getClass() == ShowLinkViewEvent.class) {
//			fireEventUp(new AddSidebarViewEvent(getView()));
		}
	}

	public void init() {
		
		register(ShowLinkViewEvent.class);
		getView().setPanelLinks(new VerticalPanel());
		
		getView().getPanelLinks().add(new Label("Links"));
		getView().getPanelLinks().add(new Hyperlink("Link 1" , ""));
		getView().getPanelLinks().add(new Hyperlink("Link 2" , ""));
		getView().getPanelLinks().add(new Hyperlink("Link 3" , ""));
		
	}

	public void terminate() {
	}

	public void initView() {
		// TODO Auto-generated method stub
		
	}

	public void initModel() {
		// TODO Auto-generated method stub
		
	}

}
